//    Copyright (C) Kherty.  All rights reserved.
using System;
using System.Collections.Generic;
using System.Text;
using OpenLS.Core.Serialization;
using OpenLS.Vml.Serialization;

namespace OpenLS.Vml.Drawing
{
    class ColorMru : IOfficeXmlSerializable
    {
        private Ext? _Ext;
        private string _colors;

        public void ReadXml(ReadContext context)
        {
            using (var c = context.Read("contextmru"))
            {
                _Ext = c.GetOptionalEnum<Ext>(VmlConstants.VmlNamespace + "ext");
                _colors = c.GetOptionalString("colors");
            }
        }

        public void WriteXml(WriteContext context)
        {
            using (var c = context.Write("contextmru"))
            {
                c.SetOptionalEnum<Ext>(VmlConstants.VmlNamespace + "ext", _Ext);
                c.SetOptionalString("colors", _colors);
            }
        }
    }
}
